<div class="potentials index">
    <h2><?php __('Assigned Potentials'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('id'); ?></th>
            <th><?php echo $this->Paginator->sort('user_id'); ?></th>
            <th><?php echo $this->Paginator->sort('product_id'); ?></th>
            <th><?php echo $this->Paginator->sort('type'); ?></th>
            <th><?php echo $this->Paginator->sort('dateenquired'); ?></th>
            <th class="actions"><?php __('Actions'); ?></th>
        </tr>
        <?php
        $i = 0;
        foreach($potentials as $potential):
            $class = null;
            if( $i++ % 2 == 0 )
            {
                $class = ' class="altrow"';
            }
        ?>
            <tr<?php echo $class; ?>>
                <td><?php echo $potential['Potential']['id']; ?>&nbsp;</td>
                <td>
                <?php echo $this->Html->link($potential['User']['firstname'], array('controller' => 'potentials', 'action' => 'view', $potential['Potential']['id'])); ?>
            </td>
            <td>
                <?php echo $this->Html->link($potential['Product']['name'], array('controller' => 'activitytypes', 'action' => 'view', $potential['Product']['name'])); ?>
            </td>
            <td><?php echo $potential['Potential']['type']; ?>&nbsp;</td>
            <td><?php echo $potential['Potential']['dateenquired']; ?>&nbsp;</td>
            <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('action' => 'view', $potential['Potential']['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $potential['Potential']['id'])); ?>
                <?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $potential['Potential']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $potential['Potential']['id'])); ?>
            </td>
        </tr>
        <?php endforeach; ?>
            </table>
            <p>
        <?php
                echo $this->Paginator->counter(array(
                    'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
                ));
        ?>	</p>

            <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
                | 	<?php echo $this->Paginator->numbers(); ?> |
        <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>